home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / strings2.zip / CHECKEX.BAT < prev    next >
DOS Batch File  |  1992-11-11  |  574b  |  20 lines

  1. rem----------------------------------------------------
  2. rem CHECKEX.BAT - Scans the path for a program name.
  3. rem----------------------------------------------------
  4. @echo off
  5. SET index=1
  6. if exist %1.com echo %1.com
  7. if exist %1.exe echo %1.exe
  8. if exist %1.bat echo %1.bat
  9. :loop
  10.    STRINGS pdir = PARSE %path%, %index%,;
  11.    IF . == .%pdir% GOTO exit
  12.    if exist %pdir%\%1.com echo %pdir%\%1.com
  13.    if exist %pdir%\%1.exe echo %pdir%\%1.exe
  14.    if exist %pdir%\%1.bat echo %pdir%\%1.bat
  15.    STRINGS index = ADD %index%, 1
  16. GOTO loop
  17. :exit
  18. SET index=
  19. SET pdir=
  20.